$(document).ajaxSend(function(e,xhr,opt){
    xhr.setRequestHeader("user_token",localStorage.getItem("token"));
});

$(document).ajaxError(function(event,xhr,opt,exc){
    if(xhr.status==401){
        location.href="blog_login.html";
    }
});